<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %>
<%@ include file="/WEB-INF/views/include/taglibs.jsp" %>

<!doctype html>
<html>
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta content="always" name="referrer">
    <title>SOP上传更新</title>
    <link href="${ctxstatic}/css/custom-style.css" rel="stylesheet" type="text/css">

    <%@ include file="/WEB-INF/views/include/common.jsp" %>
    <style>
        /*a  upload */
        .a-upload {
            padding: 4px 10px;
            height: 20px;
            line-height: 20px;
            position: relative;
            cursor: pointer;
            color: #888;
            background: #fafafa;
            border: 1px solid #ddd;
            border-radius: 4px;
            overflow: hidden;
            display: inline-block;
            *display: inline;
            *zoom: 1
        }
        table tr{
            height: 35px;
        }

        .a-upload  input {
            position: absolute;
            font-size: 100px;
            right: 0;
            top: 0;
            opacity: 0;
            filter: alpha(opacity=0);
            cursor: pointer
        }

        .a-upload:hover {
            color: #444;
            background: #eee;
            border-color: #ccc;
            text-decoration: none
        }

        #form_apply tr {
            line-height: 35px;
            margin-bottom: 4px;
        }

        #form_apply tr input, #form_apply select, #form_apply a {
            width: 144px;
        }

        .combo, .textbox {
            border: 1px solid #b9b8b8;
        }
    </style>
    <script>
        var username = "${user.username}";
    </script>
</head>

<body class="easyui-layout">
<div data-options="region:'north',border:false" style="padding: 10px 5px;">
    <input id="bom_moudle_num_s" class="easyui-textbox" data-options="label:'BOM模块编码/机型'" style="width:400px;"/>
    <input id="operator_man_s" class="easyui-textbox" data-options="label:'操作人员'" style="width:300px;"/>
    <a href="javascript:void(0)" onclick="queryRecord()" class="easyui-linkbutton button-blue"
       style="width: 70px;margin-left: 10px;">查&nbsp;询</a>
</div>
<div data-options="region:'center',border:false" style="height:100%">
    <table id="list">

    </table>
    <!-- 工具条 -->
    <div id="toolbar">
        <a id="saveBtn" href="#" class="easyui-linkbutton" data-options="iconCls:'icon-add'">添加</a>
<%--        <a id="editBtn" href="#" class="easyui-linkbutton" data-options="iconCls:'icon-edit'">修改</a>--%>
        <a id="deleteBtn" href="#" class="easyui-linkbutton" data-options="iconCls:'icon-remove'">删除</a>
    </div>
</div>
<div id="upform_dlg" style="padding: 10px">
    <div class="easyui-layout" data-options="fit:true,border:false">
        <div data-options="region:'center',border:false" style="height:100%;">
            <form id='upform' enctype='multipart/form-data'>
                <input type='hidden' name='username' value='${user.username}'/>
                <table style="text-align: center;width: 100%">
                    <tr>
                        <td colspan="2"><h5>请选择上传的SOP类型</h5></td>
                    </tr>
                    <tr>
                        <td style="width: 50%"><input name="uploadType" type="radio" value="0" checked="checked">物料编码SOP+通用SOP</td>
                        <td style="width: 50%"><input name="uploadType" type="radio" value="1">机型SOP</td>
                    </tr>
                    <tr>
                        <td colspan="2">
                            <label for='upteainput'>文件上传</label>
                            <input id='upteainput' onchange='fileChange()' name='files' type='file' class='form-control-file button-blue'>
                        </td>
                    </tr>
                </table>
            </form>
        </div>
    </div>
</div>
<div id="editWin" class="easyui-dialog" data-options="title:'物料入库单',width:500,height:400,closed:true,modal:true">
    <form id="editForm" method="post">
        <%-- 提供一个隐藏域--%>
        <input id="record_id" type="text" style="display: none" name="id"/>
        <input type="text" style="display: none" name="type_dtl_id"/>

        <table style="margin:auto" width="100%">
            <tr>
                <td style="text-align: right">物资编号:</td>
                <td><input id="typeDtlNo" type="text" name="typeDtlNo" class="easyui-textbox"
                           data-options="required:true,prompt:'输入后回车'"/></td>
                <td style="text-align: right">K3编码:</td>
                <td><input type="text" name="k3Code" class="easyui-textbox"
                           data-options="required:false,readonly:true"/></td>
            </tr>
            <tr>
                <td style="text-align: right">类别:</td>
                <td><input type="text" name="typeMain" class="easyui-textbox"
                           data-options="required:false,readonly:true"/></td>
                <td style="text-align: right">物料名称:</td>
                <td><input type="text" name="mtName" class="easyui-textbox"
                           data-options="required:false,readonly:true"/></td>
            </tr>
            <tr>
                <td style="text-align: right">型号:</td>
                <td><input type="text" name="model" class="easyui-textbox" data-options="required:false,readonly:true"/>
                </td>
                <td style="text-align: right">规格:</td>
                <td><input type="text" name="sizes" class="easyui-textbox" data-options="required:false,readonly:true"/>
                </td>
            </tr>
            <tr>
                <td style="text-align: right">数量:</td>
                <td><input id="num" type="text" name="num" class="easyui-numberbox"
                           data-options="required:true,readonly:false,prompt:'输入数量'"/></td>
                <td style="text-align: right">单位:</td>
                <td><input type="text" name="unit" class="easyui-textbox" data-options="required:false,readonly:true"/>
                </td>
            </tr>
            <tr>
                <td style="text-align: right">入库人:</td>
                <td><input id="stockin_user" type="text" name="operator" class="easyui-textbox"
                           data-options="required:false,readonly:true"/>
                </td>
                <td style="text-align: right">供应商:</td>
                <td><input id="supplier" type="text" name="supplier" class="easyui-textbox"
                           data-options="required:false,readonly:true"/></td>
            </tr>
            <tr>
                <td style="text-align: right">备注说明:</td>
                <td colspan="3"><input id="remarks" type="text" name="remarks" class="easyui-textbox"
                                       data-options="required:false,readonly:false,prompt:'备注说明',multiline:true,height:44,width:300"/>
                </td>
            </tr>
            <tr>
                <td></td>
                <td>
                    <a id="save" href="#" class="easyui-linkbutton" data-options="iconCls:'icon-ok'">提交</a>
                    <a id="reset" href="#" class="easyui-linkbutton" data-options="iconCls:'icon-reload'">重置</a>
                </td>
            </tr>
        </table>
    </form>
</div>
</body>
<script src="${ctxstatic}/js/base64.min.js" type="text/javascript"></script>
<script src="${ctxstatic}/js/sop/sopUpdate.js" type="text/javascript"></script>
</html>